import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-15
 * Time:14:25
 */
public class SimpleFuilB implements ActionListener {
        JButton button;

    public static void main(String[] args) {
        SimpleFuilB gui=new SimpleFuilB();
        gui.go();
    }
    public  void go()
    {
        JFrame frame=new JFrame();
        button=new JButton("开始游戏");

        button.addActionListener(this);

        frame.getContentPane().add(button);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(500,500);
        frame.setVisible(true);
    }

    public void actionPerformed(ActionEvent e) {
        button.setText("游戏结束");
    }
}


